package com.zhaoyu.user.feign.wemedia;

import com.zhaoyu.model.common.dtos.ResponseResult;
import com.zhaoyu.model.media.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-wemedia") // 这里的名字要和服务名称/配置文件名字一致
public interface WemediaFeign {

    @PostMapping("/api/v1/user/save")
    ResponseResult saveWmUser(@RequestBody WmUser wmUser);

    @GetMapping("/api/v1/user/findByName/{name}")
    WmUser findByNameWmUser(@PathVariable("name") String name);

}